package com.smartthinking.qualitystores;

import java.util.Hashtable;

import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

public class LoginCliente implements KvmSerializable {
	
	public String user;
	public String pass;
	
	public LoginCliente()
	{
		user = "";
		pass = "";
	}
	
	public LoginCliente(String user, String pass)
	{
		this.user = user;
		this.pass = pass;
	}
	
	@Override
	public Object getProperty(int arg0) {

		switch(arg0)
        {
        case 0:
            return user;
        case 1:
            return pass;
        }
		return null;
	}
	
	@Override
	public int getPropertyCount() {
		return 2;
	}
	
	@Override
	public void getPropertyInfo(int ind, Hashtable ht, PropertyInfo info) {
		switch(ind)
        {
	        case 0:
	        	info.type = PropertyInfo.STRING_CLASS;
	            info.name = "user";
	            break;
	        case 1:
	        	info.type = PropertyInfo.STRING_CLASS;
	            info.name = "pass";
	            break;
	        default:break;
        }
	}
	
	@Override
	public void setProperty(int ind, Object val) {
		switch(ind)
        {
	        case 0:
	        	user = val.toString();
	            break;
	        case 1:
	        	pass = val.toString();
	            break;
	        default:
	            break;
        }
	}
}
